<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Relations\BelongsTo;

class FeedbackModel extends BaseModel
{
    protected $table = 'feedback';
    protected $primaryKey = 'id';

    protected $guarded = [];

    /**
     * 留言所属的用户
     *
     * @return BelongsTo
     */
    public function user(): BelongsTo
    {
        return $this->belongsTo(
            UserModel::class,
            'user_id',
            'id'
        );
    }
}
